1 <?php
2 include(
"header.php");
3 include(
"sidebar.php");
4
5 include(
"dbconnection.php");
6 if
(isset($_GET['vahicleid']))
7 {
8 $results = mysql_query(
"DELETE from vehiclestore where vehicleid ='$_GET[vahicleid]'");
9 }
10
11 ?>
12         
13                             
14         <div id=
"main">
15             
16             <a name=
"TemplateInfo"></a>
17             <h1>Vehicle Store</h1>
18             <?php

19 if
($ctins == 1)
20 {
21     echo
"<center><b>Employees account created successfully...</b></center><br>";
22     echo
"<center><b><a href='emplogin.php'>Click here to Login.</a></b></center>";
23 }

24 else

25 {
26     ?>
27         <form id=
"form1" name="form1" method="post" action="">
28           <table width=
"795" border="1">
29             <tr>
30               <th width=
"90" scope="col">Vehicle<br />
31               ID</th>
32               <th width=
"161" scope="col">Employee<br />
33               Name</th>
34               <th width=
"250" scope="col">Vehicle details</th>
35               <th width=
"95" scope="col">Estimated<br />
36               price</th>
37             
38               <th width=
"69" scope="col">Status</th>
39               <th width=
"90" scope="col" colspan="3">Actions</th>
40             </tr>
41           <?php
42 $result= mysql_query(
"select * from vehiclestore");
43           
while($arrrec= mysql_fetch_array($result))
44           {
45           $result1= mysql_query(
"select * from employee where employeeid='$arrrec[empid]'");
46          $arrrec1 = mysql_fetch_array($result1);
47            echo
" <tr>
48               <td>&nbsp; $arrrec[vehicleid]</td>
49               <td>&nbsp; <strong>Employee ID:</strong> $arrrec1[employeeid]<br>
50                          <strong>Employee Name: <br></strong> $arrrec1[fname] $arrrec1[lname]<br>
51               </td>
52               <td><img src='upload/$arrrec[images]' width='
50' height='50' align='left'></img><b><font color='green'>$arrrec[vehname]</font></b> <br>
53               &nbsp; Vehicle model: $arrrec[model]
54               &nbsp; Vehicle brand: $arrrec[brand]</td>
55               <td>&nbsp; $arrrec[estprice]</td>
56               <td>&nbsp; $arrrec[status]</td>
57               <td><a href='viewvehiclestoremore.php?vehicleid=$arrrec[vehicleid]'>More</a></td><td><a href='addvehiclestore.php?vahicleid=$arrrec[vehicleid]'>Edit</a></td><td><a href='viewvehiclestore.php?vahicleid=$arrrec[vehicleid]'>Delete</a></td>
58             </tr>"
;
59           }
60           ?>
61           </table>
62         </form>
63     <?php
64     }
65     ?>
66             <p>&nbsp;</p>
67 <br />
68                                             
69         </div>
70         
71 <!-- wrap ends here -->
72 </div>
73         
74 <?php
75 include(
"footer.php");
76 ?>


Gõ tìm kiếm nhanh...